package com.appbee.user.client;

import javax.inject.Inject;
import javax.inject.Singleton;

import com.appbee.core.client.modular.IModulRegistry;
import com.appbee.core.client.modular.impl.ActivityModul;
import com.appbee.user.client.presenter.UserInfoActivity;
import com.google.gwt.inject.client.AsyncProvider;

@Singleton
public class UserInfoActivityModul extends ActivityModul
{
	private static final String ID = "userinfo";
	private final IModulRegistry registry;

	@Inject
	public UserInfoActivityModul(	AsyncProvider<UserInfoActivity> userInfoProvider,
								IModulRegistry registry)
	{
		setDefaultActivty(userInfoProvider);
		this.registry = registry;
	}

	public void register()
	{
		registry.register(ID, this);
	}

	@Override
	public String getName()
	{
		return "User info";
	}

	@Override
	public String getId()
	{
		return ID;
	}

}
